import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

// Servlet接口实现类开发步骤
// 第一步:创建一个java类, 让它实现Servlet接口
// 为什么不直接实现Servlet接口, 而要继承HttpServlet接口
public class oneServlet extends HttpServlet {
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("针对post的处理办法...");
    }

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("针对get方法的处理办法...");
    }
}
